﻿function CheckLengthName(e, args) {
    if (args.Value.length < 3)
        args.IsValid = false;
    else
        args.IsValid = true;
}

function CheckLengthUserName(e, args) {
    if (args.Value.length < 6 || args.Value.length > 20)
        args.IsValid = false;
    else
        args.IsValid = true;
}

function CheckLengthPass(e, args) {
    if (args.Value.length < 6)
        args.IsValid = false;
    else
        args.IsValid = true;
}

function CheckLengthFone(e, args) {
    if (args.Value.length == 10 || args.Value.length == 11)
        args.IsValid = true;
    else
        args.IsValid = false;
}

function CheckLengthComment(e, args) {
    if (args.Value.trim().length < 1 || args.Value.trim().length > 500)
        args.IsValid = false;
    else
        args.IsValid = true;
}
